home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / x11 / viewers / xv-3.10a.TIFF-patch < prev    next >
Text File  |  1997-08-26  |  3KB  |  102 lines

  1. The following patch should allow you to compile XV 3.10a against the latest
  2. version of Sam Leffler's TIFF Library (libtiff 3.4).  
  3.  
  4. You do *not* need to apply this patch to compile XV 3.10a against the
  5. older version of the TIFF library (3.3) that is included in the XV
  6. 3.10a distribution.  This is only necessary if you wish to upgrade to 
  7. the newer version of the TIFF library.
  8.  
  9. You can get the latest version of the TIFF library via anonymous ftp on
  10. ftp.sgi.com, in 'graphics/tiff'.
  11.  
  12. Thanks to Dan McCoy (mccoy@pixar.com) for supplying this patch!
  13.  
  14. John Bradley
  15. -----------------------------------------------------------------------
  16.  
  17.  
  18. *** xvtiff.c.orig    Fri Jan 13 14:53:34 1995
  19. --- xvtiff.c    Thu Sep  5 16:55:46 1996
  20. ***************
  21. *** 301,306 ****
  22. --- 301,310 ----
  23.   static    byte **BWmap;
  24.   static    byte **PALmap;
  25.   
  26. + /* XXXX Work around some collisions with the new library. */
  27. + #define tileContigRoutine _tileContigRoutine
  28. + #define tileSeparateRoutine _tileSeparateRoutine
  29.   typedef void (*tileContigRoutine)   PARM((byte*, u_char*, RGBvalue*, 
  30.                         uint32, uint32, int, int));
  31.   
  32. ***************
  33. *** 340,346 ****
  34.                            uint32, uint32, int, int));
  35.   static void   put4bitbwtile            PARM((byte *, u_char *, RGBvalue *,
  36.                            uint32, uint32, int, int));
  37. ! static void   put16bitbwtile           PARM((byte *, u_char *, RGBvalue *,
  38.                            uint32, uint32, int, int));
  39.   
  40.   static void   putRGBcontig8bittile     PARM((byte *, u_char *, RGBvalue *,
  41. --- 344,350 ----
  42.                            uint32, uint32, int, int));
  43.   static void   put4bitbwtile            PARM((byte *, u_char *, RGBvalue *,
  44.                            uint32, uint32, int, int));
  45. ! static void   put16bitbwtile           PARM((byte *, u_short *, RGBvalue *,
  46.                            uint32, uint32, int, int));
  47.   
  48.   static void   putRGBcontig8bittile     PARM((byte *, u_char *, RGBvalue *,
  49. ***************
  50. *** 1218,1224 ****
  51.    */
  52.   static void put16bitbwtile(cp, pp, Map, w, h, fromskew, toskew)
  53.        byte  *cp;
  54. !      u_char *pp;
  55.        RGBvalue *Map;
  56.        uint32 w, h;
  57.        int fromskew, toskew;
  58. --- 1222,1228 ----
  59.    */
  60.   static void put16bitbwtile(cp, pp, Map, w, h, fromskew, toskew)
  61.        byte  *cp;
  62. !      u_short *pp;
  63.        RGBvalue *Map;
  64.        uint32 w, h;
  65.        int fromskew, toskew;
  66. ***************
  67. *** 1227,1234 ****
  68.     
  69.     while (h-- > 0) {
  70.       for (x=w; x>0; x--) {
  71. !       *cp++ = Map[(pp[0] << 8) + pp[1]];
  72. !       pp += 2;
  73.       }
  74.       cp += toskew;
  75.       pp += fromskew;
  76. --- 1231,1237 ----
  77.     
  78.     while (h-- > 0) {
  79.       for (x=w; x>0; x--) {
  80. !       *cp++ = Map[*pp++];
  81.       }
  82.       cp += toskew;
  83.       pp += fromskew;
  84. ***************
  85. *** 1514,1520 ****
  86.     case PHOTOMETRIC_MINISWHITE:
  87.     case PHOTOMETRIC_MINISBLACK:
  88.       switch (bitspersample) {
  89. !     case 16: put = put16bitbwtile; break;
  90.       case 8:  put = putgreytile;    break;
  91.       case 4:  put = put4bitbwtile;  break;
  92.       case 2:  put = put2bitbwtile;  break;
  93. --- 1517,1523 ----
  94.     case PHOTOMETRIC_MINISWHITE:
  95.     case PHOTOMETRIC_MINISBLACK:
  96.       switch (bitspersample) {
  97. !     case 16: put = (tileContigRoutine) put16bitbwtile; break;
  98.       case 8:  put = putgreytile;    break;
  99.       case 4:  put = put4bitbwtile;  break;
  100.       case 2:  put = put2bitbwtile;  break;
  101.